package com.project.demo.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.api.ApiController;
import com.baomidou.mybatisplus.extension.api.R;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.project.demo.entity.Useproduct;
import com.project.demo.service.UseproductService;
import com.project.demo.service.editproductService;
import com.project.demo.vo.useproductVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * (Useproduct)表控制层
 *
 * @author makejava
 * @since 2021-08-31 11:25:26
 */
@RestController
public class UseproductController extends ApiController {
    /**
     * 服务对象
     */
    @Autowired
    UseproductService useproductService;
    @RequestMapping("/useproduct")
    public useproductVo useproduct(Integer page, Integer limit) {
        return useproductService.FinduseproductVo(page, limit);
    }

    @RequestMapping("/useproduct1")
    public useproductVo useproduct1() {
        return useproductService.FindAlluseproductVo();
    }
    @RequestMapping("/useproduct1/{id}")
    public Integer deleteVo(@PathVariable("id") Integer id) {
        return useproductService.deletevo(id);
    }
    @RequestMapping("/adduproduct")
    public Integer insertproduct(Integer id, String sname, String sperson, String speople, String zczt, String sbegint, String scondition) {
        return useproductService.insertvo(id,sname,sperson,speople,zczt, sbegint, scondition);
    }
}
